package com.ycsj.goldmedalnewconcept.student.fragment;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.blankj.utilcode.util.ToastUtils;
import com.ycsj.common.base.BaseLazyFragment;
import com.ycsj.goldmedalnewconcept.R;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * 学生端配音的Fragment
 * Created by Administrator on 2019/2/19 0019.
 */

public class StudentPeiYinFragment extends BaseLazyFragment {

    @BindView(R.id.tv_title)
    TextView tvTitle;
    @BindView(R.id.iv_back)
    ImageView ivBack;
    @BindView(R.id.iv_jinpai)
    ImageView iv_jinpai;
    @BindView(R.id.iv_mypeiyin)
    ImageView iv_mypeiyin;

    public static final String TAG = StudentPeiYinFragment.class.getName();

    //单体模式
    private static class LazyHolder {
        private static final StudentPeiYinFragment INSTANCE = new StudentPeiYinFragment();
    }

    public static final StudentPeiYinFragment newInstance() {
        return LazyHolder.INSTANCE;
    }

    @Override
    protected int getLayoutId() {
        return R.layout.fragment_student_py;
    }

    @Override
    public void lazyInit(View view, Bundle savedInstanceState) {

    }

    @Override
    protected void init(View view, Bundle savedInstanceState) {
        super.init(view, savedInstanceState);

        //初始化标题栏
        initTitle();


    }

    /**
     * 初始化标题栏的方法
     */
    private void initTitle() {
        ivBack.setVisibility(View.INVISIBLE);
        tvTitle.setText("i配音");
    }


    /**
     * 点击事件
     *
     * @param view
     */
    @OnClick({R.id.iv_jinpai, R.id.iv_mypeiyin})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.iv_jinpai:
                //金牌新概念
                ToastUtils.showShort("暂未开放");
                break;
            case R.id.iv_mypeiyin:
                //我的配音
                ToastUtils.showShort("暂未开放");
                break;
        }
    }
}
